package com.zhou.base.components.mp.ds.login;

/**
 * @author xianfeng
 * @date 2023/10/28 20:00
 * @description:
 */
public class SecurityContext {
    private static ThreadLocal<LoginUser> securityHolder = ThreadLocal.withInitial(() -> {
        return null;
    });

    public static LoginUser getLoginUser() {
        return securityHolder.get();
    }

    public static void setLoginUser(LoginUser user) {
        securityHolder.set(user);
    }
}
